package com.define.ssh.dao.impl;

import org.springframework.stereotype.Repository;

import com.define.ssh.dao.FictitiousUserDao;
import com.define.ssh.model.FictitiousUser;

@Repository("fictitiousUserDaoImpl")
public class FictitiousUserDaoImpl extends BaseDaoImpl<FictitiousUser, Long>
		implements FictitiousUserDao {

	@Override
	public Integer gmcount(Integer pid) {
		Integer i=0;
		String sql = "select count(*) from compdept where pid=" + pid;
		Object  cdCount=getSession().createSQLQuery(sql).uniqueResult();
		//String sql1 = "select count(*) from deptuser where deptid=" + pid;
		//Object  deCount=getSession().createSQLQuery(sql1).uniqueResult();
		i=i+Integer.valueOf(cdCount.toString());
		//i=i+Integer.valueOf(deCount.toString());
		return i;
	}

}